//
//  main.m
//  NSMutableString基本概念
//
//  Created by wenjim on 17/10/23.
//  Copyright © 2017年 WenJim. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    
    
    /*
    NSString * str = @"cwj";// 一开始str指向 @"cwj"对应的内存
    str = @"cwjLove";// 修改了str指针的指向，让它指向 @"cwjLove"对应的内存
    NSString * newStr = [str stringByReplacingOccurrencesOfString:@"c" withString:@"z"];
    NSLog(@"%@",newStr);
    */
    
    // 创建一个空的字符串
    NSMutableString * str = [NSMutableString string];
    NSLog(@"修改前：%@",str);
    [str appendString:@"cwj"];
    NSLog(@"修改后：%@",str);
    
    NSMutableString * strM = [[NSMutableString alloc] init];
//    strM = [NSMutableString alloc] initWithFormat:<#(nonnull NSString *), ...#>;
//    strM = [NSMutableString stringWithFormat:<#(nonnull NSString *), ...#>];
    
    
    return 0;
}
